Writing a MARC Map condition

If you need to specify conditions under which a specific subfield should be extracted, you can create condition statements at the MARC Map, Tag Map, or Subfield Map level. The conditional statement is a Boolean that can be either "true" or "false". When "true", Portfolio continues to the next level within the MARC Map and either processes the tag conditions or extracts the specified tags and subfields. When a conditional statement at the MARC Map level is "false", Portfolio continues to the next MARC Map. A "false" at the tag or subfield level signals Portfolio to proceed to the next tag or subfield, or to the next MARC Map if there are no other Tag Maps or Subfield Maps in the MARC Map.

Conditions are written in a simple script that describes the conditions that need to be met to be true.

Element Description Example

Expression

The complete condition; it may contain one or multiple clauses that are separated by "AND" or "OR".

Note: The Boolean operators (AND and OR) must be capitalized when writing a MARC map condition.

(((000 subfield $_6:1 value is "a") OR(006 subfield $_0:1 value is "a")) AND ((008 subfield $_23:1 value is "d") OR (006 subfield $_6:1 value is "d")))

clause

A clause is a combination of an indicator or a tag and subfield with a value comparison or state.

(000 subfield $_6:1 value is "a")

(024 indicator 1 value is "1")

tag

The tag is the three-digit MARC tag number.

000 245

indicator

The indicator specifies the one-digit code for indicator 1 or indicator 2 in the tag.

(028 indicator 1 value is "3")

(028 indicator 2 value is "0")

subfield

The subfield is the letter that indicates the subfield of the tag. The format includes "subfield" followed by a space and a string character ("$"). In cases where the tag does not have a subfield (such as "000") the underscore character ("_") is used to indicate that the unnamed string will be evaluated.

When you specify the extraction of the portion of a string in a tag, specify the starting location and the number of characters to extract. The starting location is zero-base, meaning that the first character is "0". For example, in a subfield, "6:1" begins the string after the sixth character and extracts the next (seventh) character.

Note: Strings are case sensitive and must match exactly for a statement to be "true."

521 subfield $a

subfield $_6:1

value

The value is a comparison between a specified string and the string found in the subfield or tag.

value is "a"

value is not "t"

state

The state tests the existence of content in a subfield.

(521 subfield $a exists)

(521 subfield $a does not exist)

The following list shows sample conditional statements. You can find more in the MARC 21 and UNIMARC Maps (see Delivered MARC 21 MARC Maps and Delivered UNIMARC MARC Maps).

  • (856 subfield $z exists)
  • (856 subfield $z does not exist)
  • (245 subfield $k value is "textbook")
  • ((245 subfield $k value is "textbook") OR (245 subfield $l value is "[textbook]"))
  • (880 subfield $60:3 value is "245")
  • (024 indicator 1 value is "1")
  • (500 indicator 1 value is not "0")
  • ((000 subfield $_6:1 value is not "a") AND (000 subfield $_6:1 value is not "t"))
  • ((100 subfield $a17:1 value is "a") OR (100 subfield $a17:1 value is "b") OR (100 subfield $a17:1 value is "c") OR (100 subfield $a17:1 value is "d"))

To write a MARC condition

  1. Log in to the Admin console.
  2. Choose Search Configuration from the navigation pane.
  3. Choose MARC Maps.
  4. Do one of the following to open the tag set you want to work with:

    • Choose Edit for the custom MARC Map you want to include the condition.
    • Navigate to the tag or subfield where you want to include the condition, then choose Edit.
  5. Enter the condition statement in the Condition field.

    In Edit MARC Map page, enter the condition in the MARC 21 Standard Condition or UNIMARC Standard Condition field.

  6. Choose OK when you have finished.

Related topics